<?php /* Smarty version 2.6.31, created on 2018-03-27 11:16:32
         compiled from E:/xampp/htdocs/rbac/Admin/Tpl/Authority/accessList.html */ ?>
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "../Common/head_authority.html", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
<body>
<div class="container-fluid">
    <div class="row" style="margin: 20px 0px;">
        <b>权限列表</b>
        <a href="<?php echo @__APP__; ?>
?c=Authority&m=addAccess" style="float: right;">添加权限</a>
    </div>
    <table class="table table-hover">
        <thead>
        <tr>
            <th>权限</th>
            <th>图标</th>
            <th>Urls</th>
            <th>操作</th>
        </tr>
        </thead>
        <?php $_from = ($this->_tpl_vars['accessData']); if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['v']):
?>
        <tr>
            <td class="col-sm-2 col-md-2 col-lg-2"><?php echo $this->_tpl_vars['v']['title']; ?>
</td>
            <td class="col-sm-2 col-md-2 col-lg-2">
                <?php if ($this->_tpl_vars['v']['level'] == 0): ?>
                <span class="glyphicon <?php echo $this->_tpl_vars['v']['icon_class']; ?>
"></span>
                <?php endif; ?>
            </td>
            <td class="col-sm-4 col-md-5 col-lg-5" title="<?php echo @__APP__; ?>
?c=<?php echo $this->_tpl_vars['v']['control']; ?>
&m=<?php echo $this->_tpl_vars['v']['method']; ?>
" style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap">
                <?php if ($this->_tpl_vars['v']['level'] == 0): ?>
                <?php else: ?>
                <?php echo @__APP__; ?>
?c=<?php echo $this->_tpl_vars['v']['control']; ?>
&m=<?php echo $this->_tpl_vars['v']['method']; ?>

                <?php endif; ?>
            </td>
            <td class="col-sm-3 col-md-3 col-lg-3">
                <a href="<?php echo @__APP__; ?>
?c=Authority&m=editAccess&id=<?php echo $this->_tpl_vars['v']['id']; ?>
" class="btn btn-success btn-xs">编辑</a>
                <button type="button" onclick="access_del('<?php echo $this->_tpl_vars['v']['id']; ?>
')" class="btn btn-danger btn-xs">删除</button>
            </td>
        </tr>
        <?php endforeach; endif; unset($_from); ?>
    </table>
    <div class="col-sm-12 col-md-12 col-lg-12 pagination">
        <a href="#" class="pagination-info">共条<b><?php echo $this->_tpl_vars['data']['sumRows']; ?>
</b>记录，本页显示<b><?php echo $this->_tpl_vars['data']['startRows']; ?>
-<?php echo $this->_tpl_vars['data']['endRows']; ?>
</b></a>&nbsp;
        <a href="#" class="pagination-info"><?php echo $this->_tpl_vars['data']['currentPage']; ?>
/<?php echo $this->_tpl_vars['data']['sumPage']; ?>
</a>&nbsp;
        <a href="<?php echo @__APP__; ?>
" class="pagination-link">首页</a>
        <a href="<?php echo @__APP__; ?>
?c=Authority&m=accessList&page=<?php echo $this->_tpl_vars['data']['prePage']; ?>
" class="pagination-link">上一页</a>
        <a href="<?php echo @__APP__; ?>
?c=Authority&m=accessList&page=<?php echo $this->_tpl_vars['data']['nextPage']; ?>
" class="pagination-link">下一页</a>
        <a href="<?php echo @__APP__; ?>
?c=Authority&m=accessList&page=<?php echo $this->_tpl_vars['data']['sumPage']; ?>
" class="pagination-link">尾页</a>&nbsp;&nbsp;
        <input type="text" class="jumpPage" id="jumpPage"/>
        <a href="#" class="pagination-link" id="pagination-jump">跳转</a>
    </div>
</div>
<?php echo '
<script type="text/javascript">
    $(\'#pagination-jump\').click(function(){
        var page = $(\'#jumpPage\').val();
        location.href = \'./index.php?c=Authority&m=accessList&page=\'+page;
    })
    function access_del(id){
        if(confirm("确定删除该权限吗？")){
            location.href = "./admin.php?c=Authority&m=accessDel&id="+id;
        }
    }
</script>
'; ?>

</body>
</html>